<template>
  <basic-container>
    <h3>project-page</h3>
    <avue-crud :option="option"
               :data="data"
               @refresh-change="refreshChange"
               @on-load="onLoad"
               :page="searchForm"
               :table-loading="tableLoading">
    </avue-crud>
  </basic-container>
</template>

<script>
import { option } from "./project-option.js";

export default {
  data() {
    return {
      option,
      data: [],
      config:[],
      tableLoading:true,
      searchForm:{
        total:0,
        indexPage:1,
        pageSize:20,
      }
    };
  },
  methods: {
    onLoad(page) {
        this.searchForm.indexPage = page.currentPage
        this.searchForm.currentPage = page.currentPage
        this.searchForm.pageSize = page.pageSize
        this.templateList()
    },
    templateList(){
      this.tableLoading = false
      this.data = []
    },
    refreshChange () {
      this.templateList()
    }
  }
};
</script>

<style scoped>
</style>
